import { GlobalEventMgr } from "../../platform/event/GlobalEventMgr";
import { IScript } from "../IScript";
import { Msg_Login_Resp, Msg_Resp } from "../msgs";
import { MsgTypes } from "../MsgTypes";
import { script } from "../NetManager";
import { SyncDemoEvent } from "../SyncDemoEvent";

@script()
export class MoveRespScript implements IScript<Msg_Login_Resp> {
    getType(): string {
        return MsgTypes.Login;
    }
    handle(msg: Msg_Resp<Msg_Login_Resp>): void {
        // const lastProcessedSequence = msg.lastProcessedSequence;

        // 通知本地玩家控制器
        GlobalEventMgr.ins.emit(SyncDemoEvent.MoveResp, msg.data, 0);
    }
}